import os
import getpass   
print("\033["+str(101)+"m"+"This is a hobry os"+"\033[0m")
a = getpass.getpass("login")
if a == "root":
    b = getpass.getpass("password")
    while True:
        c = input("[localhost@root]")
        if c == "neofetch":
            for n in range(10):
                print(' ' * (9-n) + '*' * (2*n+1))
            print("\033["+str(101)+"m"+"    hobry os"+"\033[0m")
        elif c == "touch":
            name = input("name: ")
            open(name, mode='x', encoding=None)
        elif c == "rm":
            file = input("path")
            os.remove(file)
            print("删除成功")
        elif c == "shutdown now":
            print("正在关机........")
            break
        elif c == "cls":
            clear = os.system("cls")
        elif c == "pvim":
            flpef = input("file name")
            f = open('ol.txt')
            f.read()

        elif c == "rmdir":
            opdd = input("file")
            os.rmdir(opdd)
        elif c == "mkdir":
            m = input("opf name")
            os.chdir(m)
        elif c == "pwd":
            n = os.getcwd()
            print(n)
        elif c == "ls":
            z = os.listdir()
            print(z)
        else:
            print(" bash: command not found")
else:
    print("\033[31mnot user\033[0m")
